Extending Business Logic in WS-AppServer Generated Applications |
|
WS-AppServer helps you to build applications that support end-to-end business of an organization. WS-AppServer creates models upon databases and Java sources, and generates Web service operations using those models. In other words, the sources are transformed and exposed as Web services. The exposed Web services are readily available to be used by any application based on SOA architecture. WS-AppServer also facilitates code customization so that the existing functionality of the application can be extended.
The business logic that is available in the form of database-generated classes and methods may fulfill the business requirements to a certain extent. However, if you want to implement additional logic to customize the application and tune it to business requirements, you will need to modify the way application works.
WS-AppServer provides you the necessary framework support with which you can implement the custom logic and design the applications to behave just as you want.
While modeling data and generating the application content, WS-AppServer builds both static and dynamic business logic. The Base class of the generated Java code contains the static business logic, whereas the Extension class is a structure with provision to include dynamic business logic in the generated business logic. The following table shows the basic differences between the types of business logic generated by WS-AppServer.
Static Business Logic |
Dynamic Business Logic |
---|---|
Rigid logic |
Dynamically changes based on several parameters and constraints |
Directly mapped to the database |
Facilitates addition of rules and constraints |
Reliable and stable performance |
Varied performance based on the logic executed |
Single purpose |
Customizable and reusable |
If you want to create the entire business logic afresh, you can create Custom classes. WS-AppServer also provides a very useful facility to build rules directly on the data models (both standard and custom) that are created and maintained in the WS-AppServer package.
You can extend the business logic in any of the following ways, depending upon the business requirement:
- Add custom logic to the extension classes of the generated Java code
- Create custom classes
- Create composite classes
- Build rules on WS-AppServer models